package zhoug.chart.data;


import com.github.mikephil.charting.interfaces.datasets.IDataSet;
import zhoug.chart.views.MPIconView;

import androidx.annotation.NonNull;

/**
 * 自定义图例对象
 *
 * @Author 35574
 * @Date 2020/9/29
 * @Description
 */
public class MPLegendEntry {
    private String label;//图例名称
    /**
     * {@link MPIconView#RECTANGLE, MPIconView#CIRCLE, MPIconView#RING, MPIconView#RECTANGLE_ARC, MPIconView#LINE}
     */
    private int iconShape = MPIconView.RECTANGLE;//图标形状
    private int iconColor;//图标颜色
    private int labelColor;//图例名称颜色
    private int circleColor;//线中间圆形的颜色
    private int circleHoleColor;//线中间孔洞的颜色
    private IDataSet<?> dataSet;

    public MPLegendEntry(@NonNull IDataSet<?> dataSet) {
        this.dataSet = dataSet;
    }

    public MPLegendEntry(String label, int iconShape, int iconColor,@NonNull IDataSet<?> dataSet) {
        this.label = label;
        this.iconShape = iconShape;
        this.iconColor = iconColor;
        this.dataSet = dataSet;

    }

    public @NonNull IDataSet<?> getDataSet() {
        return dataSet;
    }


    public int getIconShape() {
        return iconShape;
    }

    public void setIconShape(int iconShape) {
        this.iconShape = iconShape;
    }

    public int getIconColor() {
        return iconColor;
    }

    public void setIconColor(int iconColor) {
        this.iconColor = iconColor;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public int getLabelColor() {
        return labelColor;
    }

    public void setLabelColor(int labelColor) {
        this.labelColor = labelColor;
    }

    public int getCircleColor() {
        return circleColor;
    }

    public void setCircleColor(int circleColor) {
        this.circleColor = circleColor;
    }

    public int getCircleHoleColor() {
        return circleHoleColor;
    }

    public void setCircleHoleColor(int circleHoleColor) {
        this.circleHoleColor = circleHoleColor;
    }


}
